package net.luerything.restlet.gwt.rpc;

import org.restlet.representation.Representation;

import static net.luerything.restlet.gwt.rpc.Commons.Result;

/**
 * @author keke
 */
public interface GwtRpc {
  /**
   * Do an RPC call to self. <br/>
   * This method is used when GwtRpc is extended by a subclass.
   *
   * @param rep the representation
   * @return
   */
  Result doRpc(Representation rep);

  /**
   * Do an RPC call on <code>target</code>.
   *
   * @param target
   * @param req
   * @return
   */
  Result doRpc(Object target, Representation req);
}
